# -*- coding: utf-8 -*-
"""
Created on Fri Sep  3 18:00:53 2021

@author: 刘长奇-2019300677
"""
a=input('please input a matrix :')
b=list(a)
c=['0']
for i in reversed(range(len(b))):
    if b[i]==' ' or b[i]=='\n' or b[i]=='[' or b[i]==']' :
        del b[i]
for j in range(len(b)):
    c[0]=c[0]+b[j]

d=str(c)
d=d.split(',')
num=len(d)
result='0'
r1=d[0]
r2=d[num-1]
r1=r1.strip('[0\'')
r2=r2.strip('\']')
d[0]=r1
d[num-1]=r2

target=input('Please input a number which you want to find :')
for h in range(num):
        if target==d[h]:
            print('true')
            result='true'
        
        elif result!='true' and h==num-1:
            print('false')

